const mongoose = require('mongoose');
// 创建分类集合 schema
const cateSchema = new mongoose.Schema({
  cateName:{
    type: String,
    required: true
  },
  cateIcon:String, // 分类图标的路径
  cateDesc: String,
  pid: {
    type: String,
    default: '-1' // -1代表顶层分类
  }

})

// 创建 cateModel
const cateModel = mongoose.model('qf_cates', cateSchema);

module.exports = cateModel;